home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
ZSIM12.ARJ
/
ZSIM.DOC
< prev
next >
Wrap
Text File
|
1992-01-12
|
29KB
|
804 lines
**********************************************************************
**********************************************************************
ZZZZZZZZZZ SSSSSSSS IIII M M
ZZ SS II MM MM
ZZ SS II M M M M
ZZ SS II M M M M
ZZ --------- SS II M M M M
ZZ --------- SS II M M M
ZZ SS II M M
ZZ SS II M M
ZZZZZZZZZZZ SSSS IIII MMM MMM
The hundred percent Z80 Emulator
Version 1.2
(C) 1990, 1992 by Jürgen Weber
Jürgen Weber
Wiesentalstr. 1
W-7170 Schwäbisch Hall
Federal Republik of Germany
**********************************************************************
**********************************************************************
IMPORTANT:
The author assumes no responsibility for the correctness of the
documentation or the function of the program. The user is advised to
test the programm fully. The risc of using the software is exclusive
at the user. The author assumes no responsibility whatever for damages
of any kind that might result from using the program.
Cited produkt names are trade names.
Hardware/Softwarepreconditions:
PC/XT/AT, 1 Diskdrive (5 1/4 " recommended), 256K free memory,
MsDos 2.1 or compatible.
Serious work is only possible with machines faster than 8 MHz 80286.
Every 10 MHz shown by the Landmark test correspond to 1 MHz of the
emulated Z80.
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
*********************************************************************
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
Be sure that you do not insert a MS-Dos disc when prompted for a CP/M
disc. The CP/M bios would overwrite the MS-Dos disc without prompting.
Also MS-Dos overwrites CP/M discs.
As soon as the emulator prompts for inserting a CP/M disc only use
CP/M discs.
Be sure that the CP/M disc has the right format. Insert the disc
WRITE PROTECTED and make display the directory. If only dots are
displayed it is a clue for a wrong format. But also if "NO FILE" is
displayed it might be a wrong format exept if you are sure that the
disc is indeed empty.
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
*********************************************************************
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
INSTALLATION:
Copy the files in the package into a directory of your harddisk.
GERNERAL:
ZSIM emulates a Z80 CP/M Machine (CP/M 2.2), but not the CP/M
operating system itsself. In order to start CP/M, a CP/M System disc
must be inserted into drive A:, where from ZSIM boots CP/M. The
CP/M system or a compatible operating system (SUPERDOS and Z80DOS are
included in the ZSIM package) also can be put into a file CPMSYS.CPM
on the hard disk.
Every CP/M program I could test ran correctly, even the floating point
library of the public domain program SMALL-C, that requires a high
compatiblity, as it uses undocumented Z80 codes.
The complete compatibility to a CP/M machine is reached because
contrary to other emulators that emulate the operating system itself
ZSIM only emulates the Z80 and the bios. On this virtual machine runs
an original CP/M kompatible operating system or CP/M.
EMULATOR:
Fellowing only the specialties of the virtual CP/M machine are
described. For information concerning the CP/M operating system please
consult literature covering this subject.
ZSIM creates a CP/M maschine with 64K ram, one disk drive and a
ramdisc. There is only one physical drive supported. The physical
drive can be set to IBM-PC drive 0 or 1 changing the disc parameters
in the control-Break menue. The physical drive is always CP/M drive A.
The whole memory pool that is not required by Dos, ZSIM and the 64K
working space for the Z80, is used as ramdisc (440K ramdisc in a 640K
PC). This ramdisc can be saved in a MS-Dos File, that will be
automatically loaded starting ZSIM next time, but only if there is
enough memory for the ramdisc. So don't use more TSRs next time. This
way you can keep important utilities in the ramdisc and have them
present every time you start ZSIM.
STARTING:
While starting ZSIM tries to load CP/M Bdos from a MS-Dos file
CPMSYS.CPM into memory. The file must be in the direktory ZSIM was
started in.
The ZSIM package contains two CP/M compatible operating systems in the
files SUPERDOS.SYS and Z80DOS.SYS. Both contain the ZCPR1 command line
processor. Z80DOS is a derivative of SUPERDOS and supports date and
time (ZSIM' s bios furnishes time and date). But there may be write
errors if you use discs that were allready written to by the original
CP/M system. This is because Z80DOS uses another faster file system.
To use one of the public domain operating systems simply copy
SUPERDOS.SYS or Z80DOS.sys to CPMSYS.CPM:
COPY SUPERDOS.SYS CPMSYS.CPM
If you format a disc using the utility CPMFRM you can start CP/M
programs, e.g. Small-C, without having the original CP/M operating
system. Create as described above CPMSYS.CPM, insert a disc formatted
by CPMFRM and start ZSIM.
If CPMSYS.CPM is not present, ZSIM tries to load the system from the
boot tracks by scanning all sectors within the reserved tracks for the
Copyright message of Digital Research . If it is found DRs copyright
is displayed and the fellowing sectors are loaded as system. A system
disc is only required for boot up, afterwards the system is kept in
memory.
Beispiel:
Even if you would like to use the original CP/M a system disc is only
necessary to start ZSIM. Afterwards the system is kept in memory.
After succesful boot from disc you can create with MOVCPM a file
containing the system (don't forget the blank between the * *) and
transfer it to MsDos. There it is put into PUNCH.CPM. Afterwards you
should rename it to CPMSYS.CPM.
Example:
jgw 59K TPA cp/m 80 bios ver 1.0 -- 05/09/90 (C) 1990 by Jürgen Weber
BDOS: COPYRIGHT (C) 1979, DIGITAL RESEARCH
A>b:
B>movcpm * *
CONSTRUCTING 64k CP/M vers 2.2
READY FOR "SYSGEN" OR
"SAVE 34 CPM63.COM"
B>save 34 cpm.sys
B>pip
*up2:=cpm.sys[o]
*
For savety's sake first empty the punch buffer and delete the punch
file (in this order) to make sure the CP/M system will be put at the
beginning of PUNCH.CPM. Transfer as shown above the system. Empty the
punch buffer, start a SHELL and rename PUNCH.CPM into CPMSYS.CPM.
You can specifiy behind MOVCPM a smaller number, too. This generates a
smaller CP/M system and leaves Z80 memory behind CP/M TPA and the
system area. ZSIM automatically loads the smaller CP/M to the right
place.
The public domain operating systems SUPERDOS and Z80DOS are always
loaded by ZSIM that way that bdos is situated at 0ec00h.
DISK FORMATS:
Fellowing CP/M disk formats are supported:
Amstrad CPC System (169K, phys. Sektors 41h-49h)
Amstrad CPC Data (178K, phys. Sektors 0c1h-0c9h)
CP/M 86 SS DD (153K)
CP/M 86 DS DD (316K)
and additionally a special format corresponding to CPC data format
but with physical sector numbers starting at 1.
The Amstrad is a Z80 Homecomputer that was quite popular in Europe in
the middle of the eighties.
The first two formats are special formats of the Amstrad CPC. The high
nibble of the sector number is used to diffenciate the formats. The
other two are used by CP/M 86 on an IBM PC and also by CCP/M 86 and
DOS Plus, that is shipped with the Amstrad PCs. Dos Plus is compatible
to CP/M 86 and PC-Dos and good for copying between CP/M and MsDos.
An additional advantage of this format is, that discs can be created
using Dos FORMAT.COM (FORMAT /8). But before that the sector fill byte
in the drive parameter table of Dos must be set to 0e5h. If you find
this to be too awkward you can use the program CPMFRM.EXE. It installs
the necessary parameters and calls FORMAT.COM. If there is the Msdos
default fill byte 0f6h in the CP/M directory CP/M sees an entry and
thinks the disk is full.
ZSIM recognizes the format of the inserted disk at every warm boot if
it is one of the five specified above. So every time you insert
another disk you should press Control-C. But this is recommended
anyway as Bdos aborts with "Bdos Error on A:RO" on any write attempt
to a disk that was not logged in with Control-C.
It is possible to edit manually the disk parameters from the Control
Break Menu and adapt them to a given manufacturer dependent format.
Also you can start ZSIM with parameter /f <diskparfile>. <diskparfile>
can be created by Control-Break menu Save Parameters.
Note that single density formats are not supported by the IBM Bios and
8 Inch disks don't like being pressed into a 5 1/4 Inch drive.
SCREEN DRIVER
The screen driver supports the CP/M Plus screen control codes.
Additionally a subset of control codes of the Amstrad CPC is
supported. For a description of the control codes see appendix 1.
Contrary to Digital Research's recommendation Bit 7 of the input ascii
code is not zeroed.
If you enter an international character (e.g. a German umlaut) it is
translated from IBM coding into CP/M coding (e.g. ä => { ). To display
an international character set it should be switched on by ESC 2 2.
PRINTER:
Characters are sent to printer lpt0. ZSIM waits until the printer has
taken the character correctly. This can result in an infinite loop if
the printer is switched off. To prevent this there is a test for
Control-C. If it is pressed there is a warm boot. This is only
recommended in case of emergency because this way the calling program
is aborted too, of course.
PUNCHER:
Digital Research specified function 6 for serving a puncher.
As punchers haven't great importance anymore I used functions 6 and 7
to transfer data to MsDos and vice versa. Characters are appended to
the MSdos file PUNCH.CPM. It is created if non existend. Characters
are buffered until buffer full. The buffer is also written out if you
hit Control-Break.
Calling function 6:
It's easiest done with PIP. But don't use the logical device PUN:
(Puncher) because then PIP first sends some zero bytes. You should
either use PTP: or UP2:. If you use PTP: and transfered an ascii file
PIP appends EOF.
PIP UP2:=ANYFILE.EXT[o]
The option [o] (object file) prevents PIPs stopping after the first
1ah (EOF) byte while transfering a non ascii file. The option is not
necessary for transfering an ascii file.
Remind that data are APPENDED to PUNCH.CPM.
You should preced as fellowing:
- transfer the file with PIP as described above
- in Control-Break menue select Empty Punch Buffer
- in Control-Break menue select OS Shell and under MSDOS
renam PUNCH.CPM into the name you want:
REN PUNCH.CPM file.txt
EXIT
ENDING THE EMULATION:
The Z80 emulation can be terminated by pressing Control-Break where
after a menue pops up. You will also see this menue if the emulator
encounters the Z80 code HALT.
Warning: Hitting Control-Break only sets a flag that has to be
evaluated during the next bios call. That means if the Z80 is stuck in
an infinite loop you have to reboot the PC. Regularly testing the flag
during the emulation would take too much time.
In rare cases a fatal error can occur: Dos loads ZSIM and its disc
buffers to an unlucky address, that a so called DMA Boundary Crossing
is happening. Then the emulation is instantly aborted. The emulator
must be loaded to another address. Simply start a new shell with
entering COMMAND and afterwards ZSIM again.
CONTROL BREAK MENÜ
After pressing Control Break the fellowing menue pops up:
┌─────────────────┐
│Continue │
│Save Ramdisc/Quit│
│Quit │
│Save Ramdisc │
│Delete Punch File│
│Init Reader │
│OS Shell │
│Disk Parameters │
│Save Parameters │
│Load Parameters │
│Warm Boot │
│About │
└─────────────────┘
Use the cursor keys to select the action you wish. Esc finishes the
menue, same as Continue.
Continue continues the CP/M emulation
Save Ramdisc/Quit saves the ramdisk to the disc ZSIM was started
from and ends ZSIM.
Quit ends ZSIM without saving the ramdisc.
Save Ramdisk saves the ramdisc and continues the emulation.
This makes sense if you wish to save different
contents of the ramdisc. Important: after that
you have to start an OS Shell and rename the
saved ramdisc (RAMDISC.CPM) else it would be
overwritten if you save the ramdisc next time.
Empty Punch Buffer empties the buffer the puncher writes its data to
and writes the data onto the harddisc.
Delete Punch File deletes the MsDos file, the punch data are written
into.
OS Shell starts an Dos Shell, but you only get 64K memory
for it. But that is enough for REN and COPY.
Disk Parameters is used for editing the CP/M disc parameters
(described below).
Save Parameters saves the disc parameters to a file. Enter
herefore a filename with extention. The parameters
are saved as hexbytes in the same order they appear
in the edit box. Before the parameters the bytes
'JW' are saved as signature.
The autologin flag is not saved.
Load Parameters loads the disc parameters from a file that was
saved with Save Parameters. Enter for loading the
filename with extention. After loading the
autologin flag is cleared and a warm boot is made.
Warm Boot has the same effect as pressing Control-C under
CP/M, but it also works if a program runs.
About tells the program name and Author.
DISC PARAMETERS
If you select Disk Parameters in the Control-Break menue you can edit
the parameters in an edit panel.
During input only valid hex digits are accepted, other characters are
ignored. ESC ends editing, changes until the line before the cursor
are valid. Use BACKSPACE to delete characters in the cursor line.
An input line must be ended with ENTER. If you press ENTER without
having entered a new value the old value is kept (like in the
fellowing example in the lines where there is no value behind the
colon).
Example:
jgw 59K TPA cp/m 80 bios ver 1.1 -- 10/12/91 (C) 1990 by Jürgen G. Weber
BDOS: COPYRIGHT (C) 1979, DIGITAL RESEARCH
Unknown disc format. Insert new disc and press any key
┌──────────────────┐
│SPT: 0024 : 28 │
│BSH: 03 : │
│BLM: 07 : │
│EXM: 00 : │
│DSM: 00A8 : B8 │
│DRM: 003F : │
│AL0: C0 : │
│AL1: 00 : │
│CKS: 0010 : 40 │
│OFF :0002 : 3 │
│ │
│DRV: 00 : │
│PTR: 28 : │
│PST: 09 : 5 │
│BPS: 02 : 3 │
│FSC: 01 : │
│LOG: FF : 0 │
└──────────────────┘
Here I had inserted an alien disc (Osbourne DD). After ZSIM had
complained about an unknown disc format I had pressed Control-Break.
Afterwards I entered the correct values.
The parameters in the upper half are standart CP/M parameters. The
others are an extention by me and mean the fellowing:
DRV: physical number of the drive with the CP/M disc (0 or 1);
but this is always drive A: withing CP/M
PTR: physical track number, 40 with a 360K drive, else (with 720K,
1.2 MB or 1.4 MB) up to 80 tracks
PST: number of physical sectors per track, 9 with 360K drives
BPS: physical sector length; BPS=log2(SecLen in bytes )-7; this value
is required by the disc controller
FSC: physical number offirst sector of track, usually 1
LOG: FF=autologin, 0=no autologin
If you change the parameters set LOG to 0, else the next autologin
would change the parameters again.
To get standart parameters, set LOG to FF, insert a disc with normal
format and press Control-C. But a secure format adaption only is
possible with single sided formats. Some two sided formats adress the
second side as extention of the tracks of the first side (with the
effect of more sectors per track), others double the track count.
ZSIMs bios uses the method of CP/M 86 double sided (double sector
count and track translation).
EMULATION OF THE Z80
The emulated machine almost completely as a Z80 CP/M machine.
All emulated Z80 instructions that change or use flags where tested
(especially how they influence flags). All defined flags are
influenced exactly as on an original Z80 chip. I tested this by
looping the register pair HL from 0 to FFFFh and copying it with PUSH
HL - POP AF to AF, executing the instruction to test and adding the
resulting AF register pair to a check sum. I improved the emulation
until all flag influencing instructions resulted the same checksum on
the Z80 and on the emulation. The Z80 flags that are not defined by
Zilog and show more or less random behaviour are not defined within
ZSIM either. But different not defined flag stati may result.
ZSIM supports non documented Z80 instructions, so called illegal
opcodes.
All CP/M programs I tested run with ZSIM as on a CP/M machine, even
the floating point package of the small-C compiler that uses
undocumented Z80 instructions.
A preeminent difference between emulation and original Z80 chip is
the execution time. There is no proportinal relation between the takt
cylcles an operation takes on the emulation and the cycles needed on a
Z80. So you cannot realise time critical applications like cassette
storing routines with ZSIM.
A Z80 uses the R register for refreshing dynamic rams and continually
increments it. Some programmers used this on a Z80 as rondom
generator. So ZSIM loads it with "random" values derived from the
system time.
Port operations do not execute port accesses, as input you get 0FFh.
The flags are set and port operations with block repeat change the
count registers accordingly. You can change all this in module PORTIO.
Some Tests of the speed of the emulation:
I used the fellowing benchmarks:
1) Compile the programm TEST.C included with Ron Cains Small C
Compiler.
The executable TEST.COM is very hard to emulate as its floating
point routines use undocumented Z80 ops. Contrary to all other
emulators I know, ZSIM emulates these operations correctly and
TEST.COM works.
2) Compiling MC.PAS (on the Turbo disc) with TURBO PASCAL 3.0 on
disc.
3) Compiling LISTER.PAS (on the Turbo disc) with TURBO PASCAL 3.0 in
memory.
4) Enter a short assembler loop with the debugger and execute it:
LD B,20
L1:LD HL,0
L2:INC HL
LD A,H
OR L
JP NZ,L2
DJNZ L1
5) let DDT dump a range of memory:
D0,8000
RESULTS (on a 16 MHz 386 SX), Z80 Tests were run on an Amstrad CPC,
Z80 A, 4 MHz:
TestNr ZSIM:Z80 CPC/Z80 ZSIM
1 0,85 3.37.00 3.04.00
2 0,88 1.20.00 1.10.00
3 0,99 0.03.65 0.03.63
4 1,37 0.17.10 0.23.45
5 0,41 4.06.00 1.40.00
Nr. 4 is the test that says most about emulation speed because here
only calculation time without bios overhead is measured.
Test Nr. 1 strains the disc drive as compiling, assembling and linking
are made on disc. The huge disk buffers of ZSIM greatly speed this up.
Test Nr. 4 is similar to test 1.
Test Nr 3 should give a similar result as Nr. 4, but Turbo Pascal
continually displays the line it compiles therefore the slow screen
output of the CPC takes time.
In test Nr 5 screen output is the bottle neck, where the CPC with its
text output in graphic mode has no chance against the screen output of
an 80386.
Appendix 1
==========
Implemented screen control sequences:
CPC
Ascii Operation
2 cursor off
3 cursor on
7 Bell
8 Cursor left
9 Cursor right
10 Cursor down
11 Cursor up
12 clear screen
13 Cursor to beginning of line
16 delete char under cursor
17 delete line to cursor
18 delete line from cursor
19 delete screen to cursor
20 delete screen from cursor
24 toggle highlight
30 cursor home
31 x y cursor column x,line y (home = 1,1 )
CP/M Plus:
ESC @ Init Screen: CLS,HOME,highlight off, cursor on,
underline off, US char set
ESC 2 x select country character set:
x country:
0 USA
1 France
2 Germany
3 Britain
4 Denmark
5 Sweden
6 Italy
7 Spain
ESC A cursor up
ESC B cursor down
ESC C cursor right
ESC D cursor left
ESC E clear screen, cursor keeps position
ESC H cursor home
ESC I cursor up, scroll if necessary
ESC J clear screen from cursor
ESC K delete line from cursor
ESC L insert line
ESC M delete line
ESC N delete char below cursor
ESC Y y x cursor to column x,line y, Home = 32,32
ESC d delete line to cursor
ESC e cursor on
ESC f cursor off
ESC j store cursor position
ESC k get stored cursor position
ESC o delete line to cursor
ESC p highlight on
ESC q highlight off
ESC r underline on
ESC s blinking on
ESC t blinking off
ESC u underline off
Appendix 2
==========
Technical description of the implemented CP/M 80 Bios
Every Bios routine is called by executing an pseudo
Z80 CALLN opcode (EDED) with biosnumber as fellowing byte.
description of the calls:
0 Cold boot
Loads Bdos from MS-Dos file CPMSYS.CPM into memory and installs bios
jp table and disk parameters in Z80 ram. Drive A: is selected,
IO-Byte and punch buffer cleared and control passed to bios routine
warm boot.
If CPMSYS.CPM does not exist, boot tries to load Bdos from the
system tracks. ZSIM searches all reserved tracks (<OFF) for the
copyright message of Digital Reasearch. If found the fellowing
sectores are loaded as Bdos.
If this was succesful you can create with MOVCPM a file that
contains the Bdos. This file must be transfered to the MS-Dos Start
Disk of ZSIM and be renamed to CPMSYS.CPM.
1 Warm boot
Copy the bdos that was loaded by function 0 into memory to its
correct position in the Z80 memory area. ZSIM takes the correct
address specified by MOVCPM. Afterwards it is tested if the disc has
a known format. If known the right disc parameters are created. Now
the Z80 simulator is started and CP/M CCP called.
2 Consol Status
return offh in A if there is a char ready on keyboard.
3 Consol Input
return ascii code from keyboard in A.
Contrary to suggested by Digital Research Bit 7 is not cleared.
If an international character (e.g. German Umlaut) is input it is
transformed from IBM code into CP/M code (e.g. ä => { ).
International character sets are only displayed if switched on with
ESC 2 x.
Extended PC keys: If in CONIO.ASM the constant WS_KEY is set to
TRUE, the cursor keys, Ins, Del, Home, End, PgUp and PgDn are
converted to wordstar control sequences (^Q... ). The fellowing call
of conin returns ^Q and the next the corresponding Code.
4 Consol Output
Displays char in C on screen. Control sequences are evaluated as
described in appendix 1.
5 List Character
Copies char in C to printer lpt0. Waits until the printer has
accepted the char correctly. This would result in an infinite loop
is there is no printer. Therefore the function tests for Control-C.
If pressed, a jump to Z80 address 0 folllows. There is normally a
jump to warm boot.
6 Punch Character
Digital Research provided this function for serving a puncher.
As punchers/readers aren't of overwhelming importance anymore I used
this function to transfer data to MS-Dos. Characters transferred to
this function are appended to the MS-Dos file PUNCH.CPM. If it does
not exist it is created.
The characters are buffered and written out, if buffer is full. This
buffer is written out too if the Control-Break menue pops up.
7 Read Character
Reads characters from MS-Dos file READER.CPM. This only works with
files that don't contain CPM_EOF (26). The PIP option [o] does not
help as there is no way to signal PIP the actual end of file and PIP
gets stuck in an infinite loop.
If READER.CPM does not exist or is read to end, CPM_EOF (26) is
returned.
To diffentiate EOF from a 26 byte in a binary file this function
additionally returns at the end of READER.CPM -1 (0ffffh) in HL else
H=0, L=char. This is not provided by DR and is not interpreted by
standart programs especially not by PIP!
The fellowing assembler lines return the character read in L or -1
in HL:
LD HL,(1)
LD DE,6*3 ; BIOS READER, RETURN IN HL OR -1 IF ERROR
ADD HL,DE
JP (HL) ;
After transfering a file you should execute Init Reader in Control
Break menue.
Example:
PIP B:ANYFILE.TXT=RDR:
8 Home
Should return the read/write heads of the drive to track 0, but is
not executed for speed reasons. Only set track with parameter 0 is
called.
9 Selekt Disk
Selects the Drive given over in register C and returns if the drive
exists in register HL a pointer of its DPH else 0. There are only
the physical drive A: and the ramdisk b:
10 Set Track
In register C.
11 Set Sektor
In register C.
12 Set DMA
Register BC contains Data transfer buffer.
13 Read Sector
Reads the sector selected by functions 9,10,10. Reading from
ramdisc is quite easy. Reading from disk is more difficult as for
reasons of speed the directory track and one data track are
buffered in ram. First must be decided if the sector is already in
buffer. If not the track first must be read from disk. Afterwards
the correct address in buffer must be calculated.
14 Write Sector
Writes the sector selected by functions 9,10,10. Writing to
ramdisc is quite easy. Writing to disk is more difficult as for
reasons of speed the directory track and one data track are
buffered in ram. If the sector is in the directory track the sector
is written out immediately for security reasons. Otherwise the
sector is buffered in ram. It is save enough only to write out the
directory track immediately as after changing a file the directory
is updated which results in writing out the directory track and the
data track.
15 ListStatus
Signals if the printer is ready to receive (A=1 = ready).
16 Sector Translation
Some CP/M systems make a logical sector translation for the skew
factor. This is done by function 16.
26 read/set time and date
This function is a supplement not provided in the CP/M 80 Bios. It
works like in CP/M Plus. It is also supported by the Public Domain
Bdos Z80DOS. To use it in the source of Z80DOS the entry address of
time must be set:
BIOStim equ BIOS+4EH
Writing of date and time (c=0ffh) is not supported in order not to
change the real time clock of the PC.
A call with C=0 reads the time and returns a pointer in HL to the
fellowing structure:
dw @date ; full days since Jan, 1st, 1978
db @hour ; hours in BCD format
db @min ; minutes in BCD format
db @sec ; secunds in BCD format
End of ZSIM.DOC